<?php
include ("../include/config.php");
require($config['basedir']."/include/authenticate.php");
require($config['basedir']."/admin/classes/common.modules.class.php");

$post = $_REQUEST;
$post['module'] = 'issueByUser';
$post['file_name'] = 'user_issues.php';
$post['module_name'] = 'Issues By Users';

$obj_cm = new CommonModules($post['module']);
$_action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view';

switch($_action) {
    case 'delete': 
		 $obj_cm->delete($post);	
	break;	 
	
	case 'change_status':
	break;
	
	case 'view':
	default:
		
		if($_REQUEST['deleted'] == 1){
			global $msgOk;
			$msgOk = 'Record deleted successfully.';
		}
		global $pager;
		$listing_data = $obj_cm->getList($post);
		stemplate::assign("post", $post);
		stemplate::assign("total_records", $pager->items_total);
  		stemplate::assign("pagination_start", $pager->low);
  		stemplate::assign("pagination",$pager->display_pages());
		stemplate::assign("page_limit_select", $pager->display_page_limits());
		stemplate::assign('listing_data', $listing_data);
		stemplate::display("admin/common_modules/".$post['module']."_list.tpl");
    break; 
}


?>